Ext.define('extjs6test.view.core.DictGrid', {
    extend: 'extjs6test.view.base.BaseGrid',
    alias: 'widget.dictgrid',
    initComponent: function () {
        this.store = Ext.create('extjs6test.store.Dict');
        this.columns = [
            {dataIndex: 'dictName', text: 'Dict Name', flex: 0.5},
            {dataIndex: 'dictCode', text: 'Dict Code', flex: 1},
            {
                dataIndex: 'dictType', text: 'Dict Type', flex: 0.5, renderer: function (value) {
                if (!value)
                    return value;
                return value == "1" ? "树型" : "简单"
            }
            },
            {dataIndex: 'joinTime', text: 'Join Time', flex: 1, xtype: 'datecolumn', format: "Y-m-d H:i:s"}
        ];
        this.callParent(arguments);
    }
});